// Copyright@ChenChao

#pragma once

#include "CoreMinimal.h"
#include "Items/Item.h"
#include "Weapon.generated.h"


/**
 * 
 */
UCLASS()
class RPG_API AWeapon : public AItem
{
	GENERATED_BODY()

public:
	AWeapon();
	
	/*装备武器函数*/
	UFUNCTION()
	void F_Equip(USceneComponent* InParent, FName InSocketName);
	
protected:
	
	/*重叠委托回调函数*/
	virtual void F_OnSphereOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp,
	                               int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult) override;
	/*重叠结束委托回调函数*/
	virtual void F_OnSphereEndOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor,
	                                  UPrimitiveComponent* OtherComp, int32 OtherBodyIndex) override;

	/*重叠物体上下浮动函数*/
	virtual void F_Float() override;
	
};
